package com.laiyao;

import com.laiyao.bean.OrderService;
import com.laiyao.bean.UserInterface;
import com.laiyao.bean.UserService;
import com.spring.LaiYaoApplicationContext;

public class test {
    public static void main(String[] args) throws Exception {
        LaiYaoApplicationContext context = new LaiYaoApplicationContext(AppConfig.class);
        UserService userService = (UserService) context.getBean("userService");
        OrderService bean1 = (OrderService) context.getBean("orderService");
        userService.test();
        System.out.println(userService);
        System.out.println(bean1);



        //销毁方法
        context.close();
    }

}
